﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using IronCow;

namespace Milkify.ComponentModel
{
    public class PriorityToStaticResourceConverter : IValueConverter
    {
        public object NoneResource { get; set; }
        public object OneResource { get; set; }
        public object TwoResource { get; set; }
        public object ThreeResource { get; set; }

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            TaskPriority priority = (TaskPriority)value;
            switch (priority)
            {
                case TaskPriority.One:
                    return OneResource;
                case TaskPriority.Two:
                    return TwoResource;
                case TaskPriority.Three:
                    return ThreeResource;
                case TaskPriority.None:
                default:
                    return NoneResource;
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
